package com.tc.modules.sys.service.impl;

import com.tc.modules.sys.mapper.SysUserDeptMapper;
import com.tc.modules.sys.model.entity.SysUserDept;
import com.tc.modules.sys.model.entity.SysDept;
import com.tc.modules.sys.service.ISysUserDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: tianchao
 * @Date: 2020/4/25 13:12
 * @Description:
 */
@Service
public class SysUserDeptServiceImpl implements ISysUserDeptService {

    @Autowired
    private SysUserDeptMapper sysUserDeptMapper;

    /**
     * 根据用户id获取用户部门信息
     *
     * @param userId 用户id
     * @return 部门信息list
     */
    @Override
    public List<SysDept> selectDeptByUserId(String userId) {
        return sysUserDeptMapper.selectDeptByUserId(userId);
    }
}
